package com.company.stack;

import java.util.LinkedList;

public class StackL {
    public LinkedList lk = new LinkedList();

    public void push(Object v) {
        lk.addFirst(v);
    }

    public Object top() {
        return lk.getFirst();
    }

    public Object pop() {
        return lk.removeFirst();
    }

    @Override
    public String toString() {
        return lk.toString();
    }
}
